//
//  ThirdListTableViewCell.swift
//  BusinessIOS
//
//  Created by Rain on 2018/11/12.
//  Copyright © 2018 XingJian Li. All rights reserved.
//

import UIKit

class ThirdListTableViewCell: UITableViewCell {

    var nameLabel : UILabel!
    
    
    var imageview : UIImageView!
    
    required init?(coder aDecoder: NSCoder) {
        
        super.init(coder: aDecoder)
        
    }
    
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.lauoutUI()
        
    }
    func lauoutUI() {
        
     
        
        
        self.imageview = UIImageView()
        
        
        self.imageview.image = UIImage.init(named: "app_hot_rec_1")
        self.contentView.addSubview(self.imageview)
        
        
        self.nameLabel = UILabel()
        self.nameLabel.text = "招商信息表格.doc"
        self.nameLabel.textAlignment = .left
        self.nameLabel.backgroundColor = UIColor.red
        self.nameLabel.font = UIFont.systemFont(ofSize:14)//一般方法
        self.nameLabel.backgroundColor = UIColor.groupTableViewBackground
        self.contentView.addSubview(self.nameLabel)
        
        
      
        
        
        
        
        self.layoutView()
        
        
    }
    
    func layoutView() {
        

        self.imageview.snp.makeConstraints { (make) in
            make.top.equalTo(self.snp.top).offset(5)
            make.left.equalTo(self.snp.left).offset(5)
            make.right.equalTo(self.snp.right).offset(-5)
            make.height.equalTo(120)
           
        }
        
        
        self.nameLabel.snp.makeConstraints { (make) in
            make.top.equalTo(self.imageview.snp.bottom).offset(0)
            make.left.equalTo(self.snp.left).offset(5)
            make.right.equalTo(self.snp.right).offset(-5)
            make.height.equalTo(30)
        }
        
        
        
        
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
